#include <stdio.h>
#include <unistd.h>
#include <string.h>
#define NUM 102

int main()
{
    char str[NUM];
    memset(str,0,sizeof(str));
    char table[] = "/-|\\";
    int i = 0;
    while(i <= 100)
    {
        printf("[%-100s][%d%%][%c]\r",str,i,table[i%4]);
        str[i++] = '#';
        fflush(stdout);
        usleep(30000);
    }
    printf("\n");
    return 0;
}

